package com.it.data_tree.tree.avlTree;

/**
 * @Author: CaoYouGen
 * @DateTime: 2023/04/27/16:10
 * @注释: AVL树节点
 **/
public class AVLNode {
    // 节点值
    public int val;
    
    // 节点平衡因子
    public int height = 1;
    
    // 左子节点
    public AVLNode left;
    
    // 右子节点
    public AVLNode right;
    
    public AVLNode () {
    }
    
    public AVLNode (int val) {
        this.val = val;
    }
    
    public AVLNode (int val, int height) {
        this.val = val;
        this.height = height;
    }
    
    public AVLNode (int val, AVLNode left, AVLNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }
}